// 保养计划
import request from "@/api/request";

// 单别
export const category_CategoryList = (params) => {
  return request({
    url: "/planmanage/mp/orderCategoryList/" + params,
    method: "post",
  });
};

// 分页查询保养计划单
export const table_data = (params) => {
  return request({
    url: "/planmanage/mp/selectAll",
    method: "post",
    data: params,
  });
};

// 逻辑删除保养计划单
export const delete_data = (params) => {
  return request({
    url: "/planmanage/mp/delete/" + params,
    method: "post",
  });
};

// 新增保养计划单
export const add_data = (params) => {
  return request({
    url: "/planmanage/mp/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 查询保养计划单详情
export const details_data = (params) => {
  return request({
    url: "/planmanage/mp/details/" + params,
    method: "post",
  });
};

// 修改保养计划单
export const update_data = (params) => {
  return request({
    url: "/planmanage/mp/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 查询装备列表
export const equip_data = () => {
  return request({
    url: "/planmanage/mp/equipList",
    method: "post",
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 查询保养单位列表
export const org_data = () => {
  return request({
    url: "/planmanage/mp/orgList",
    method: "post",
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 查询送修人员列表
export const user_data = (params) => {
  return request({
    url: "/planmanage/mp/userList/" + params,
    method: "post",
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 提交
export const submit_data = (params) => {
  return request({
    url: "/planmanage/mp/commit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 审核
export const audit_data = (params) => {
  return request({
    url: "/planmanage/mp/audit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 审核历史
export const history_data = (params) => {
  return request({
    url: "/planmanage/mp/getAuditHistory",
    method: "post",
    data: params,
  });
};

// 回退
export const undo_data = (params) => {
  return request({
    url: "/planmanage/mp/undo",
    method: "post",
    data: params,
  });
};

// 作废
export const cancel_data = (params) => {
  return request({
    url: "/planmanage/mp/cancel",
    method: "post",
    data: params,
  });
};

// 删除子表
export const delete_son = (params) => {
  return request({
    url: "/planmanage/pmp/delete/" + params,
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 经费类别
export const expenditure_type = (params) => {
  return request({
    url: "/planmanage/mp/fundCategoryList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

// 分页查询经费类别
export const query_expenditureType = (params) => {
  return request({
    url: "/planmanage/mp/fundInfoList",
    method: "post",
    data: params,
  });
};

// 等级
export const upkeep_grade = (params) => {
  return request({
    url: "/planmanage/mp/preserveLevelList",
    method: "post",
    data: params,
  });
};
